<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>回调函数</title>
</head>
<body>
    <script>
        function a (fn){
            setTimeout(() => {
                let sum = 10
                fn(sum)
            }, 1000);
        }
        a((arr)=>{
            console.log(arr);
})
function b(params){
    cosole.log(params)
}
    </script>
    
</body>
</html>